In a communication system a communication network is provided, which can link together two communication terminals so that the terminals can send information to each other in a call or other communication event. Information may include speech, text, images or video.
Modern communication systems are based on the transmission of digital signals. Analogue information such as speech is input from a microphone into an analogue to digital converter at the transmitter of one terminal and converted into a digital signal. The digital signal is then encoded and placed in data packets for transmission over a channel to the receiver of a destination terminal. When the digital signal is received at the destination terminal, the signal is decoded before it is input into a digital to analogue converter. The digital to analogue converter outputs an analogue signal to a loudspeaker or other output interface.
Analogue signals are often contaminated by electromagnetic interference from the power grid. In microphone signals, for example, this is perceived as a steady “hum”. Depending on geographical location, this hum consists of 50 or 60 Hertz signals plus harmonics, with energy typically concentrated in the lowest few harmonics. Removing these interfering harmonics can greatly improve the perceived quality of the microphone signal.
Traditional narrowband speech encoding algorithms encode signals within a frequency range of about 300-3400 Hz. By removing the signal information below 300 Hz, the lowest, and usually strongest, power grid harmonics are already filtered out, which significantly reduces the problem of power grid interference.
However recently there has been a demand for speech encoders that have improved quality and provide a natural sounding speech output. This has led to the development of wideband speech encoding methods such as AMR-WB (Adaptive Multi Rate-Wide Band) which encode frequencies from 50-7000 Hz. For wideband speech encoding methods, the lowest power grid harmonics fall within the coded frequency band. Consequently when employing encoding techniques that encode lower frequencies the perceived hum caused by the power grid harmonics is more severe.
Since the frequency of the power grid signal is very stable, most known methods employ notch filters which remove a fixed frequency band to provide a simple and effective method for removing these interfering signals. The width of the frequency band removed by the notch filter may otherwise be referred to as the width of the notch filter. For example a notch filter with a frequency response that removes a narrow frequency band is referred to as a narrow width notch filter.
FIG. 1 shows an implementation of a notch filter. The filter comprises single sample delay elements 10 and 12, gain elements 14 and 16 and mixer elements 18, 20, 22 and 24. A signal s(n) is input into the filter and a signal y(n) is output from the filter.
In the time domain, the relationship between the output signal y(n) and the input signal s(n) may be expressed as:y(n)=s(n)−Bs(n−1)+s(n−2)+(B−A)y(n−1)−(1−A)y(n−2)   Equation (1)Where A and B are the gain coefficients of gain elements 16 and 14 respectively.
A function referred to as the Z transform, commonly used in the field of signal processing, may be used to convert a discrete time domain signal into a frequency domain representation.
The Z transform of a time signal x(n) may be defined as:
                              X          ⁡                      (            z            )                          =                              X            ⁢                          {                              x                ⁡                                  (                  n                  )                                            }                                =                                    ∑                              n                =                0                            ∞                        ⁢                                                  ⁢                                          x                ⁡                                  (                  n                  )                                            ⁢                              z                                  -                  n                                                                                        Equation        ⁢                                  ⁢                  (          2          )                    Where z is a complex number:z=Kejφ  Equation (3)where K is the magnitude of z, and φ is the angular frequency.
The Z transform Y(z) of the time domain output signal y(n) and the Z transform S(z) of the input signal s(n) may be used to show the transfer function H(z) of the filter:
                              H          ⁡                      (            z            )                          =                                            Y              ⁡                              (                z                )                                                    S              ⁡                              (                z                )                                              =                                    1              -                              B                ⁢                                                                  ⁢                                  z                                      -                    1                                                              +                              z                                  -                  2                                                                    1              -                                                (                                      B                    -                    A                                    )                                ⁢                                  z                                      -                    1                                                              +                                                (                                      1                    -                    A                                    )                                ⁢                                  z                                      -                    2                                                                                                          Equation        ⁢                                  ⁢                  (          4          )                    
FIG. 2 shows the frequency response of the notch filter shown in FIG. 1. In particular FIG. 2 shows the frequency response of the filter in the lowest part of the spectrum, from 0 Hz to 100 Hz. As shown, the region R in the graph referred to hereinafter as the notch region represents the frequencies that are removed by the notch filter. The width of the notch region corresponds to the width of the frequency band removed by the notch filter, and hence the width of the notch filter.
The gain coefficient A determines the width of the notch region and the gain coefficient B determines the frequency at the centre of the notch region, hereinafter referred to as the centre frequency FC. Thus, the width of the notch filter may be set by selecting the value of the gain coefficient A of the first gain element 16. Similarly, the centre value of the frequency removed by the notch filter may be set by selecting the value of the gain coefficient B of the second gain element 14.
More specifically the notch width at −3 dB is related to the coefficient A by:W3 dB≈0.16 FSA   Equation (5)where W3 dB is the notch width in Hertz (Hz), between the two slopes of the notch region R at −3 dB, and FS is the sampling frequency in Hz. It can therefore be seen that, for a narrow notch filter, the coefficient A is made to be slightly larger than zero.
The notch centre frequency is related to the coefficient B by:FC≈0.16 FS arccos(B/2)   Equation (6)where FC is the centre frequency in Hz, FS is the sampling frequency in Hz, and arccos is an arc cosine mapping. Setting the coefficient B of the second gain element 14 to a value slightly lower than 2 the notch filter can be configured to have a centre frequency FC of 50 Hz.
To avoid removing significant parts of the desired signal, the width of such notch filters must be very narrow. Using the coefficients;    A=0.001    B=1.9996137the notch filter can is configured to have a notch centred at 50 Hz and with a width W3 dB of 2.6 Hz, for a sampling frequency FS of 16 kHz.
However the use of narrow notch filters leads to an undesired phenomenon known as ringing. Ringing is an exponentially damped sinusoidal response of a filter to an impulse. For example, if the input signal is speech, the notch filter may occasionally be excited by harmonics of the speech signal matching the notch frequency. After the burst of speech, the notch filter will continue to produce a damped sinusoid at the notch frequency for perhaps a few seconds, depending on the notch width. This ringing gives an undesired reverberation-like quality to the sound. The ringing time of a notch filter increases in inverse proportion to the notch width in frequency. Therefore, for narrow filters the ringing time is particularly pronounced.
The time response of the notch filter shown in FIG. 1 is depicted in FIG. 3, which shows significant ringing for about half a second. FIG. 3 assumes a nonzero filter state, that is, the time delay elements 10 and 12 of the filter have a residual energy caused by a previous nonzero input. A similar time response would be achieved in response to an impulse input into a filter having a zero filter state, having no residual energy from a previous input. This is known as the impulse response of the filter.
A notch filter that is sufficiently narrow not to remove audible portions of the signal will introduce audible ringing in the signal. Conversely if the width of the notch filter is designed to be wide enough not to cause ringing in the signal the filter will audibly remove parts of the input speech signal.
An alternative method for removing steady sinusoidal components from an input signal employs adaptive cancellation, see e.g., H. C. So, “Adaptive Algorithm for Sinusoidal Interference Cancellation,” Electronics Letters, vol. 33, no. 22, pp. 1910-1912, October 1997. Adaptive cancellation works in three steps. First, the parameters of one or more interfering sinusoids are adaptively estimated. Then sinusoids are synthesized based on those parameters. Finally, the synthesized sinusoids are subtracted from the input signal to create the hum-removed signal. In case of power grid harmonics, the frequency parameters are known and essentially constant, so that only the amplitude and phase parameters need to be estimated. These parameters can be estimated adaptively using any well-known adaptation method such as the Least Mean Squares (LMS) algorithm.
Adaptive cancellation suffers from very much the same problems as notch filtering, in that a trade off is made between ringing and distortions of the desired component of the input signal. Distortions may result if the parameter estimation adapts too quickly, whereas ringing may occur when the parameter estimation adapts too slowly.
It is therefore an aim of the present invention to overcome the problems presented by the prior art.